package com.ruoyi.logistic.controller;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.logistic.domain.vo.NetworkCustomerFreightCollectVo;
import com.ruoyi.logistic.service.NetworkCustomerFreightCollectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/network/customerFreightCollect")
@RestController
@Api(tags = "网点财务_出港发件费结算_客户运费汇总")
public class NetworkCustomerFreightCollectController {
    @Autowired
    private NetworkCustomerFreightCollectService networkCustomerFreightCollectService;

    @ApiOperation("搜索客户运费汇总")
    @PostMapping("/search")
    public R search(@RequestBody
            @Param("networkCustomerFreightCollectVo") NetworkCustomerFreightCollectVo networkCustomerFreightCollectVo){
//        List<NetworkCustomerFreightCollect> networkCustomerFreightCollectList = networkCustomerFreightCollectService.search(networkCustomerFreightCollectVo);
//        if (networkCustomerFreightCollectList == null || networkCustomerFreightCollectList.size() == 0){
//            return R.fail("暂无数据");
//        }else {
//            return R.ok(PageInfo.info(networkCustomerFreightCollectList));
//        }
        return networkCustomerFreightCollectService.getSearch(networkCustomerFreightCollectVo);
    }

}
